<!DOCTYPE html>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>商之联后台管理系统</title>
  <meta name="description" content="这是一个 table 页面">
  <meta name="keywords" content="table">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <link rel="stylesheet" href="{:C('SUPPLIER_ADMIN_CSS')}amazeui.min.css"/>
  <link rel="stylesheet" href="{:C('SUPPLIER_ADMIN_CSS')}admin.css">
</head>
<body>
<!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
  以获得更好的体验！</p>
<![endif]-->
 <style type="text/css">
 .tabbox td{text-align: center;}
 .am-btn-toolbar .am-btn-group, .am-btn-toolbar .am-input-group{
  float: none;
 }
</style> 
<!-- header start-->

<include file="Public:header"/>

<!-- header end-->
<div class="am-cf admin-main">
 <!-- sidebar start -->
   <include file="Public:menu"/>
  <!-- sidebar end -->

<!-- content start -->
<div class="admin-content">

  <div class="am-cf am-padding">
    <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">运营商管理</strong> / <small>添加运营商</small></div>
  </div>

  <div class="am-tabs am-margin" data-am-tabs={noSwipe:1}>
    <ul class="am-tabs-nav am-nav am-nav-tabs">
      <!-- <li class="am-active"><a href="#tab1">企业基本信息</a></li> -->
      <li><a href="#tab2">运营商信息</a></li>
    </ul>
    <form action="{:U('Yunying/Saveedit',array('yid'=>$_GET['yid']))}" method="post" id="yun" onsubmit="return check()">
    <div class="am-tabs-bd">
    

      <div class="am-tab-panel am-fade" id="tab2">
        


        <div class="am-g am-margin-top">
            <div class="am-u-sm-4 am-u-md-2 am-text-right">
             登陆账号:
            </div>
            <div class="am-u-sm-8 am-u-md-10">
              <input type="text" class="am-input-sm" name="yname" value="{$yun.yname}"> <span style="color:red">*</span> 
            </div>
          
          </div>


          <div class="am-g am-margin-top">
            <div class="am-u-sm-4 am-u-md-2 am-text-right">
             公司名称:
            </div>
            <div class="am-u-sm-8 am-u-md-10">
              <input type="text" class="am-input-sm" name="companyname" value="{$yun.companyname}"  >  
            </div>
          
          </div>
          <div class="am-g am-margin-top">
            <div class="am-u-sm-4 am-u-md-2 am-text-right">
             联系人:
            </div>
            <div class="am-u-sm-8 am-u-md-10">
              <input type="text" class="am-input-sm" name="connectname"  value="{$yun.connectname}" > <span style="color:red">*</span> 
            </div>
          
          </div>
         
          <div class="am-g am-margin-top">
            <div class="am-u-sm-4 am-u-md-2 am-text-right">
             电话:
            </div>
            <div class="am-u-sm-8 am-u-md-10">
              <input type="text" class="am-input-sm" name="mobile" value="{$yun.mobile}"><span style="color:red" >*</span> 
            </div>
          </div>
          <div class="am-g am-margin-top">
            <div class="am-u-sm-4 am-u-md-2 am-text-right">
             QQ:
            </div>
            <div class="am-u-sm-8 am-u-md-10">
              <input type="text" class="am-input-sm" name="qq" value="{$yun.qq}"> 
            </div>
          </div>

       
          <div class="am-g am-margin-top">
            <div class="am-u-sm-4 am-u-md-2 am-text-right">
              开发区域:
            </div>
            <!--父级省级代理-->
            <if condition="$rank eq '1' ">
             <select disabled="disabled" name="sheng_id">
             <foreach name="sheng" item="data" key='key'>
            <option value="{$key}" disabled="true">{$data}</option>
            </foreach>
          </select>
          <select   name="shi_id" id="selCities" required onchange="javascript:place();" >
          <!--默认选中的城市-->
            <empty name="city" >
            <option value="" >请选择</option>
             <foreach name="cityall" item="data" key="key">
             <option value="{$key}">{$data}</option>
            </foreach>
            <else/>
           <foreach name="cityall" item="da" key="key">
          <foreach name="city" item="data" key='k'>
             <if condition="$k eq $key">
             <option value="{$k}" selected="selected" >{$data}</option>
             <else/>
              <option value="{$key}" >{$da}</option>
             </if>
            </foreach>
            </foreach>
            </empty>
            <!--该省下的所有城市-->
           
          </select>
          <select name="area_id"  id="selDistricts" >
             <!--默认选中的地区-->
             <empty name="area">
            <option value="">请选择</option>
            <else/>
            <foreach name="area" item="data" key='key'>
            <option value="{$key}" selected="selected" id="mr">{$data}</option>
            </foreach>
            </empty>
                      
          </select>
          <!--父级省代理结束-->
          
          <!--父级市级代理-->
          <elseif condition="$rank eq '2'"/>
            <select disabled="disabled" name="sheng_id">
             <foreach name="sheng" item="data" key='key'>
            <option value="{$key}" disabled="true">{$data}</option>
            </foreach>
          </select>
          <select  disabled="disabled" name="shi_id" onchange="javascript:place();">
            <foreach name="city" item="data" key='key'>
            <option value="{$key}">{$data}</option>
            </foreach>
          </select>
          <select name="area_id"   required id="sel">
           <empty name="area">
           <option value="">请选择</option>
           <foreach name="all" item="data" key='key'>
           <option name="{$key}">{$data}</option>
           </foreach>
           <else/>
           <foreach name="all" item="data" key="key">
           <foreach name="area" item="da" key='k'>
           <if condition="$k eq $key">
           <option value="{$k}" selected="selected" >{$da}</option>
           <else/>
           <option value="{$key}">{$data}</option>
           </if>
           </foreach>
           </foreach>
           </empty>
          </select>
          <else/>
          </if>
          <!--父级市代理结束-->
          </div>
          
          <div class="am-g am-margin-top">
            <div class="am-u-sm-4 am-u-md-2 am-text-right">
              输入密码:
            </div>
            <div class="am-u-sm-8 am-u-md-10">
              <input type="password" class="am-input-sm" name='pass' id="pass" ><span style="color:red">*</span> 
            </div>
          </div>
          <div class="am-g am-margin-top">
            <div class="am-u-sm-4 am-u-md-2 am-text-right" >
              确定密码:
            </div>
            <div class="am-u-sm-8 am-u-md-10">
              <input type="password" class="am-input-sm" name='twopass' id="repass"  ><span style="color:red">*</span> 
            </div>
          </div>
         
          

       
      </div>



    </div>

<div class="am-margin">
    <button class="am-btn am-btn-primary am-btn-xs checkyun" > 提交</button>
    <input type="reset" class="am-btn am-btn-primary am-btn-xs">
  </div>
  <input type="hidden" name="action" value="addyun">
  </form>


  </div>

  
</div>



  <script src="{:C('SUPPLIER_ADMIN_JS')}jquery.min.js"></script>
<include file="Public:footer"/>

<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="{:C('SUPPLIER_ADMIN_JS')}polyfill/rem.min.js"></script>
<script src="{:C('SUPPLIER_ADMIN_JS')}polyfill/respond.min.js"></script>
<script src="{:C('SUPPLIER_ADMIN_JS')}amazeui.legacy.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->

<script src="{:C('SUPPLIER_ADMIN_JS')}jquery.min.js"></script>
<script src="{:C('SUPPLIER_ADMIN_JS')}amazeui.min.js"></script>
<!--<![endif]-->
<script src="{:C('SUPPLIER_ADMIN_JS')}app.js"></script>
<script type="text/javascript">
///三级联动获取区域
function place(){
 
  var area=$('#selCities').val();
  
  //var x = document.getElementById("mr");


  jQuery.get('{:U("Yunying/area")}',
    {region:area,},
    function(data){
     $("#mr").remove();
    var str="<option value=''>请选择</option>";
      $("#selDistricts").append(str);
      $('#selDistricts').append(data);
    },'text');
}
</script>
<script type="text/javascript">
  ///阻止表单的默认提交
  function check(){
  var are=$("#sel").val();
 
 // var city=$("#selCities").val();
if(are.length==0){
alert("请选择区域");
return false;
}
return true;
}
</script>
<script type="text/javascript">
  $(function(){
       var modultname="Yunying";

       $('.'+modultname).addClass('am-in');
});
</script>
</body>
</html>
